package com.hxrfid.project.domain.bo;

import com.hxrfid.common.core.domain.BaseEntity;
import com.hxrfid.common.core.validate.AddGroup;
import com.hxrfid.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 订单商品业务对象 bs_order_product
 *
 * @author hxrfid
 * @date 2025-06-30
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class BsOrderProductBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单id
     */
    @NotNull(message = "订单id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 商品id
     */
    @NotNull(message = "商品id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品主图
     */
    private String mainImage;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productTitle;

    /**
     * 商品价格
     */
    @NotNull(message = "商品价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal productPrice;

    /**
     * 商品数量
     */
    @NotNull(message = "商品数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productNum;

    /**
     * 单位
     */
    private String unit;

    /**
     * 详细区域
     */
    private String areaAddr;

    /**
     * 商品金额
     */
    private BigDecimal totalPrice;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 租户编码
     */
    @NotNull(message = "租户编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long tenantId;


}
